#pragma once
#define _CRT_SECURE_NO_WARNINGS 1 
#include<iostream>
using namespace std;
#include<assert.h>
class Date

{
public:
	void Print()const;
	bool CheckDate()const;
	int GetMonthDay(int year, int month)const;

	Date(int year = 1900, int month = 1, int day = 1);
	Date(const Date& d);
	~Date();
	Date* operator&();
	const Date* operator&()const;

	Date& operator=(const Date& d);
	Date& operator+=(int day);
	Date operator+(int day)const;
	Date operator-(int day)const;
	Date& operator-=(int day);
	Date& operator++();
	Date operator++(int);
	Date operator--(int);
	Date& operator--();
	bool operator>(const Date& d)const;
	bool operator==(const Date& d)const;
	bool operator >= (const Date& d)const;
	bool operator < (const Date& d)const;
	bool operator <= (const Date& d)const;
	bool operator != (const Date& d)const;
	int operator-(const Date& d);
	friend ostream& operator<<(ostream& out, const Date& d);
	friend istream& operator>>(istream& out, Date& d);
private:
	int _year;
	int _month;
	int _day;
};

ostream& operator<<(ostream& out, const Date& d);
istream& operator>>(istream& in, Date& d);
